import { createSlice } from '@reduxjs/toolkit'

const initialState = {
  active: 1
}

const tabbarSlice = createSlice({
  name: 'tabbar',
  initialState,
  reducers: {
    updateActive(state, { payload }) {
      state.active = payload
    }
  }
})

export const { updateActive } = tabbarSlice.actions
export default tabbarSlice.reducer
